# encoding:utf-8
from __future__ import unicode_literals
"""xiche URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""


from django.conf.urls import url,include
from django.contrib import admin
from django.conf import settings
from customer import views as cus_view
from customer import block_views as cus_block_view
from customer import pay
from customer import sms

urlpatterns = [
    url(r'^$',cus_view.main_page),
    url(r'^zk_fake/?$',cus_view.zk_fake_page),
    url(r'^admin/?', admin.site.urls),
    url(r'^hook/$',cus_view.hook),
    
    url(r'^zk/new_session/?$',cus_view.new_session),
    url(r'^zk/qr/?$',cus_view.qr),
    # url(r'^zk/start/?$',cus_view.start),
    # url(r'^zk/end/?$',cus_view.end),
    url(r'^zk/heartbeat/?$',cus_view.heart_beat),
    url(r'zk/washstate/?$',cus_view.washstate),
    url(r'^zk/log/?$',cus_view.zk_log),
    url(r'^zk/last_chepai/?$',cus_view.zk_last_chepai),
    

    url(r'^sms/getcode/?$',cus_view.get_code),
    url(r'^sms/validate/?$',cus_view.valide_sms),
    url(r'^user/login/?$',cus_view.user_login),
    url(r'^user/regist/?$',cus_view.user_regist),
    url(r'^user/updateuserhead/?$',cus_view.update_user_head),
    url(r'^user/info/?$',cus_view.user_info),
    url(r'^user/order/?$',cus_view.user_order),
    
    url(r'^user/del/?$',cus_view.del_user),
    
    url(r'^order/check_key/?$',cus_view.check_order_key),
    url(r'^session/check/?$',cus_view.session_check),

    url(r'^car/searchbrand/?$',cus_view.searchbrand),
    url(r'^car/searchmodel/?$',cus_view.searchcar),  
    url(r'^car/anonymous_regist/?$',cus_view.car_anonymous_regist),
    
    url(r'^wash/washqrcode/?$',cus_view.washqrcode), # 废弃
    url(r'^washlocal/nearby/?$',cus_view.nearby),
    
    
    #url(r'^pay/getorder/?$',pay.get_order), # 弃用
    #url(r'^pay/order_reply/(\w+)/$',cus_view.wxpay_reply,name='order_reply'),
    #url(r'^pay/qr/wx',pay.),
    
    url(r'^meal/?$',cus_view.active_meal),
    
    url(r'^wxpay/new_order/?$',cus_view.wx_order),
    url(r'^wxpay/notify/?$',cus_view.wxpay_reply),
    
    # url(r'^pay/consume/$',cus_view.consume),
    url(r'qr/(?P<content>[^\/]+)/?$',cus_view.general_qr,name='qr'),
    
    url(r'^block/session/check/?$',cus_block_view.session_check),
    url(r'^block/zk/new_session/?$',cus_block_view.new_session),
    url(r'^block/car/active_session/?$',cus_block_view.active_session),
    url(r'^test/func',cus_block_view.list_func),
    url(r'.*$',cus_view.all),  
    
]


if settings.DEBUG and getattr(settings,'DEBUG_TOOLBAR',None):
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
